//
//  MeatMarketCrossTableViewCell.m
//  PigMarket
//
//  Created by 张敬 on 2019/7/16.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "MeatMarketCrossTableViewCell.h"
#import "MeatMarketShopCard.h"
#import "BuyMeatModel.h"

@implementation MeatMarketCrossTableViewCell

- (void)setupUI{
    
    self.backgroundColor = mBackgroudColor;
    
    [self addSubview:self.oneShopCard];
    [self addSubview:self.twoShopCard];
}


- (void)setupLayout{
    
    _oneShopCard.mj_x = 15;
    _twoShopCard.mj_x = _oneShopCard.right + 10;
}


#pragma mark - setter and getter

- (void)setMeatModel1:(BuyMeatModel *)meatModel1{
    
    _oneShopCard.meatBuyUI.model = meatModel1;
    _oneShopCard.meatBuyUI.scoreNum = 3.9;
}


- (void)setMeatModel2:(BuyMeatModel *)meatModel2{
    
    _twoShopCard.meatBuyUI.model = meatModel2;
    _twoShopCard.meatBuyUI.scoreNum = 3.0;
}


- (MeatMarketShopCard *)oneShopCard{
    if (!_oneShopCard) {
        _oneShopCard = [[MeatMarketShopCard alloc] init];
    }
    return _oneShopCard;
}

- (MeatMarketShopCard *)twoShopCard{
    if (!_twoShopCard) {
        _twoShopCard = [[MeatMarketShopCard alloc] init];
    }
    return _twoShopCard;
}

@end
